package com.sunbim.rsrv.mapper;

import com.sunbim.rsrv.pojo.Region;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;
import java.util.Map;

/**
 * <p>
 * 江苏省地区表 Mapper 接口
 * </p>
 *
 * @author yuhui
 * @since 2022-01-14
 */
@Mapper
public interface RegionMapper extends BaseMapper<Region> {

    @Select("select distinct city from region")
    List<Object> getCity();

    @Select("select distinct zone from region where city=#{city}")
    List<Object> getZone(String city);

    @Select("select distinct town from region where city=#{city} and zone=#{zone}")
    List<Object> getTown(String city, String zone);

    List<Object> getCityList();

    List<Object> getZoneList(String city);
}
